#include <cstdio>
using namespace std;

int main()
{
    int n = 0, n_1 = 1, n_2 = 1, num;
    scanf(" %d", &num);
    for (int i = 0; i < num - 2; i++) {
        n_2 = n_1;
        if (n != 0)
            n_1 = n;
        n = n_1 + n_2;
    }
    printf("%d\n", n);
    return 0;
}